import { defineComponent, h } from "@vue/runtime-core";
import startPageImg from "../assets/start_page.jpg";
import startBtn from "../assets/startBtn.png";

export default defineComponent({
  setup(props, ctx) {
    const onClick = () => {
      ctx.emit("changePage", "GamePage");
    };

    return { onClick };
  },
  render(ctx) {
    return h("Container", [
      h("Sprite", { texture: startPageImg, width: 750, height: 1080 }),
      h("Sprite", {
        texture: startBtn,
        x: 228,
        y: 515,
        interactive: true,
        onClick: ctx.onClick,
      }),
    ]);
  },
});
